<?php
echo $this->Html->script('jquery.bxSlider.min');
if(count($advertises) > 0) { ?>
<div id="slideShow">
	<ul id="slider-ul" style='padding:0; margin:0; list-style-type: none'>
		<?php foreach($advertises as $item) : ?>
			<li>
				<?php
					echo $html->image( 'banner/'. $item['Picture']['image_link'],
							array(
								'style'     => 'width:689px; height:150px',
								'align'		=> 'center'
						)
					);
				?>
			</li>
		<?php endforeach; ?>
	</ul>
</div>
<?php }
else {
?>
<div id="slideShow"><img src="" width="520" height="150" />
</div>
<?php
}
?>

<script type="text/javascript">

	$(document).ready(function(){
		$("ul#slider-ul").bxSlider({
			mode: 'horizontal',
			auto: true,
			pager: false,
			nextText: '',
			prevText: '',
			pause: 6000,
			autoHover: true
		});
	});
	</script>